import 'package:flutter_module/core/app_env.dart';
import 'package:flutter_module/model/native_image_options.dart';
import 'package:flutter_module/model/native_media_type.dart';

/// Create by kyluzoi
/// Date: 2021-08-10
///
/// Description: flutter 与 native 通信接口定义

abstract class BridgeInterface {
  goToNative(String uri, {Map? params});

  onBack(Map? prams);

  Future<Map<String, String>> getHeaderParams();

  /// 从相册选择并上传（现只支持单选）
  /// imageOptions: 图片可选参数
  /// videoOptions: 视频可选参数
  /// displayMediaType: video|image 显示的类型 默认image
  Future<String> selectAndUploadFromPhotos(
      {NativeMediaType displayMediaType = NativeMediaType.image,
      required NativeImageOptions imageOptions});
  Future<EnvConfig> getHost(); // 按照 EnvConfig 的字段传过来
}
